<template>
  <div class="header">
    <div class="container clearfix">
      <el-menu theme="dark" :default-active="activeIndex" mode="horizontal"
               @select="handleSelect">
        <el-menu-item index="1">处理中心</el-menu-item>
        <el-menu-item index="2">订单管理</el-menu-item>
        <el-submenu index="3">
          <template slot="title">我的控制台</template>
          <el-menu-item index="3-1">选项1</el-menu-item>
          <el-menu-item index="3-2">选项2</el-menu-item>
          <el-menu-item index="3-3">设置</el-menu-item>
        </el-submenu>
      </el-menu>
    </div>
  </div>
</template>

<script>
  export default {
    name: 'my-header',
    data () {
      return {
        activeIndex: '1'
      }
    },
    methods: {
      handleSelect (key, keyPath) {
//        console.log(key, keyPath)
      }
    }
  }
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="less">
  .header {
    background-color: #324157;
    .el-menu {
      float: right;
    }
  }

</style>
